home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global RecipeNum, currMarker, StartingLine, OnceCheck
- set RecipeNum to 1
- set the foreColor of field "shop1" to 204
- set the foreColor of field "shop2" to 204
- set the foreColor of field "shop1temp" to 204
- set the foreColor of field "shop2temp" to 204
- set the text of field "shop1" to EMPTY
- set the text of field "shop2" to EMPTY
- set the text of field "shop1temp" to EMPTY
- set the text of field "shop2temp" to EMPTY
- windowRoutine()
- tell window "notes"
- set currText1 to the text of field "shop1"
- end tell
- tell window "notes"
- set currText2 to the text of field "shop2"
- end tell
- set the text of field "shop1" to currText1
- set the text of field "shop2" to currText2
- set the foreColor of field "shop2" to 204
- set the foreColor of field "shop2temp" to 204
- forget(window "notes")
- set the text of field "shop1temp" to line 1 to 10 of field "shop1"
- set the text of field "shop2temp" to line 1 to 10 of field "shop2"
- cursor(-1)
- set currMarker to "ABC"
- set the text of field "backField" to EMPTY
- set StartingLine to 1
- set OnceCheck to 0
- set the text of field "current" to EMPTY
- set the text of field "previous" to EMPTY
- clearPuppets()
- end
-
- on DontMovie
- if the type of member 200 of castLib "videos" = #digitalVideo then
- set the movieRate of sprite 41 to 0
- duplicate(member "empty" of castLib "Videos", member 200 of castLib "Videos")
- set the visible of sprite 41 to 0
- end if
- end
-
- on windowRoutine
- global gProgrmPathOnHD
- set winRect to rect(1, 1, 1, 1)
- set the modal of window "notes" to 0
- set the titleVisible of window "notes" to 0
- set the windowType of window "notes" to 1
- set the rect of window "notes" to winRect
- set the fileName of window "notes" to gProgrmPathOnHD & "notes.dir"
- end
-
- on stopMovie
- windowRoutine()
- set shop1 to field "shop1"
- set shop2 to field "shop2"
- tell window "notes"
- set the text of field "shop1" to shop1
- end tell
- tell window "notes"
- set the text of field "shop2" to shop2
- end tell
- tell window "notes"
- saveMovie()
- end tell
- forget(window "notes")
- clearPuppets()
- end
-
- on clearPuppets
- global TriviaCounter, Fade, OnceCheck, StartingLine, gAdd, ShoppingLine, forClear, RecipeNum
- set TriviaCounter to 0
- cursor(4)
- unLoad(the frame)
- sound stop 2
- if Fade then
- sound fadeOut 1, 60
- startTimer()
- repeat while the timer < 60
- end repeat
- set Fade to 0
- end if
- set the scrollTop of member "foodprep" to 0
- puppetSound(2, 0)
- DontMovie()
- set gAdd to 0
- set StartingLine to 1
- set ShoppingLine to 1
- set OnceCheck to 0
- repeat with l = 1 to 41
- set the cursor of sprite l to 0
- end repeat
- repeat with i = 1 to 48
- set the visible of sprite i to 1
- if i <> 42 then
- puppetSprite(i, 0)
- end if
- end repeat
- if (the frame > 123) and (the frame < 205) and forClear then
- windowRoutine()
- set x to field "currNotes"
- tell window "notes"
- set the text of field (RecipeNum + 50) to x
- end tell
- tell window "notes"
- saveMovie()
- end tell
- set the text of field "currNotes" to EMPTY
- end if
- forget(window "notes")
- forget(window "favorite")
- set forClear to 0
- end
-
- on showRects x, y
- repeat with i = x to y
- put i && the width of sprite i && the height of sprite i && the left of sprite i && the top of sprite i
- end repeat
- end
-
- on showCurrent
- global current, HitList, NumHits
- abcSort()
- set BackUp to HitList & EMPTY
- if (HitList <> []) and (count(HitList) < 174) then
- unity2(HitList, current)
- set HitList to value(BackUp)
- set NumHits to count(HitList)
- end if
- if HitList = [] then
- set NumHits to 0
- end if
- set the text of field "total" to EMPTY
- set the text of field "query-total" to EMPTY
- updateStage()
- set y to count(current)
- set sorted to []
- set z to y
- if z > 10 then
- set z to 10
- end if
- repeat with i = 1 to z
- set x to getAt(current, i)
- set cocktail to line x of field "names"
- put cocktail into line i of field "total"
- end repeat
- put line 1 to z of field "total" into field "query-total"
- if NumHits > 8 then
- set currHits to 8
- else
- set currHits to NumHits
- end if
- repeat with i = 18 to 25
- set the visible of sprite i to 0
- end repeat
- repeat with i = 1 to currHits
- set the visible of sprite (i + 17) to 1
- end repeat
- put y into field "cocktail counter"
- end
-
- on translate Choice
- global RecipeNum
- repeat with i = 1 to the number of lines in field "names"
- if Choice = line i of field "names" then
- set RecipeNum to i
- exit repeat
- end if
- end repeat
- end
-
- on HitListCheck
- global current, CompVec, HitList
- set counter to count(CompVec)
- set currVec to []
- set currentKeep to current
- repeat with i = 1 to counter
- set curr to getAt(CompVec, i)
- if not ((char 1 of curr = "w") or (char 1 of curr = "h")) then
- add(currVec, curr)
- end if
- end repeat
- set counter to count(currVec)
- set HitList to []
- if counter > 1 then
- set current to the value of field getAt(currVec, 1)
- repeat with i = 2 to counter
- set list2 to the value of field getAt(currVec, i)
- division(current, list2)
- end repeat
- set counter to count(current)
- repeat with i = 1 to counter
- set x to getAt(current, i)
- set y to getPos(currentKeep, x)
- if y > 0 then
- add(HitList, x)
- end if
- end repeat
- set current to HitList
- abcSort()
- set HitList to current
- set current to currentKeep
- end if
- end
-